#ifndef __TERRAINSELECTHELPEROBJECT_H__
#define __TERRAINSELECTHELPEROBJECT_H__

#include <bigimage/renderitem.h>
#include <bigimage/geometry.h>
#include "helperobject.h"


class CTerrainObject;
class CTerrainSelectHelperGeometry: public CGeometry{
public:
    CTerrainSelectHelperGeometry( CTerrainObject* pTerrainObject );
    virtual ~CTerrainSelectHelperGeometry();
    virtual CVertexBuffer* GetRenderBuffer();
    virtual CIndexBuffer* GetIndexBuffer();
    virtual void UpdateGeometry( float fLeft, float fTop, float fRight, float fBottom );

private:
    CTerrainObject* m_pTerrainObject;
    Ref < CVertexBuffer*> m_rRenderBuffer;
    Ref< CIndexBuffer* >m_rIndexBuffer;
};




class CTerrainSelectHelperObject: public CHelperObject{
public:
    CTerrainSelectHelperObject();
    virtual ~CTerrainSelectHelperObject();
    void Init( CTerrainObject* pTerrainObject, float fLeft, float fTop, float fRight, float fBottom );
    void UpdateGeometry( float fLeft, float fTop, float fRight, float fBottom );
    virtual int32 GetRenderElementHandles( CRenderElement** vRenderElementHandle, int32 nMaxCount );

private:
    CTerrainObject* m_pTerrainObject;
    Ref< CRenderItem* >m_rRenderItem;
    Ref< CTerrainSelectHelperGeometry* >m_rTerrainHelperGeometry;

};


#endif
